<template>
  <div>
      <el-input v-model="filterText" placeholder="Filter keyword" />
      <el-tree class="filter-tree" :data="list" :props="defaultProps" @node-click="change"/>
      
  </div>
</template>

<script>
import myaxios from 'axios'
export default {
    data(){
    return {
      list: [
        {
          name: this.list,
          son: [
            {
              name: this.list,
              son: [
                {
                  label: this.list,
                },
              ],
            },
          ],
        },
      ],
      defaultProps: {
        children: 'son',
        label: 'name',
      },
    }
    },
    methods:{
        sele(){
            myaxios({url:'http://127.0.0.1:5000/oran',method:'get'}).then(res=>{          
            console.log(res.data)
            this.list = res.data.list
          })
        }, 
        change(data){
            console.log(data)
            this.$emit('chagepid', data.pid)

        }


    },
    mounted(){
        this.sele()
    }

}
</script>

<style>

</style>